<?php
require_once "../model/dealString.class.php";
require_once "../model/connectdb.php";
$catname=$_POST['catname'];//行业名
$catUrl=$_POST['urlList'];//要爬取的链接
$deal=new dealString();
$deal->setString($catUrl);
$jsonCatUrl=$deal->urlToJSON();
$db=new db();
$db->connectdb();
$res=$db->query("INSERT INTO relativeUrl(cat,relativeUrl) VALUES ('$catname','$jsonCatUrl')");
if($res){
	echo "1";
}
else{
	echo "3";
}
?>